package com.example.demo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class WebSecurityConfig {
    /*
     * protected void configure(AuthenticationManagerBuilder builder) throws
     * Exception { builder.userDetailsService(anyUserDetailsService)
     * .passwordEncoder(passwordEncoder());
     *
     * }
     */


    //该类完成密码加密
    @Bean
    public BCryptPasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();

    }
}
